package com.jinzhi.wxpay.service.impl;




import com.baomidou.mybatisplus.plugins.Page;
import com.jinzhi.wxpay.dao.ProductMapper;
import com.jinzhi.wxpay.entity.OrderInfo;
import com.jinzhi.wxpay.entity.OrderParme;
import com.jinzhi.wxpay.entity.ProductDO;
import com.jinzhi.wxpay.entity.ProductVO;
import com.jinzhi.wxpay.service.ProductService;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;

import java.util.ArrayList;
import java.util.List;


@Service
public class ProductServiceImpl extends ServiceImpl<ProductMapper, ProductDO> implements ProductService {



    @Override
    public Page<ProductVO> listProductByDesc(int current, int number, ProductVO productVO) {
        // 新建分页
        Page<ProductVO> page = new Page<ProductVO>(current, number);
        List<ProductVO> orderInfoPageList = baseMapper.listProductByDesc(page,productVO);
        return page.setRecords(orderInfoPageList);
    }

    @Override
    public List<ProductVO> listProductByDescXCX() {
        return baseMapper.listProductByDescXCX();
    }
}
